<?php
class menuController extends AController{	
	
	function visitAction() {
		// 权限确认
		//ATools::exceed();
		
		$ROLE_ID = $_SESSION['user']['role_id'];
		if ($ROLE_ID) {
			//$fields = 'ROLE_NAME, REMARK, RIGHT_LIST';
			$where = "ROLE_ID=$ROLE_ID";
			$this->role = JYDB::find("ROLE",$where,"*","");
		}
		$this->roleid = $ROLE_ID;
		
		// 获取菜单表
		//$this->menus = CKConfig::$menus;
		$menus =  ATools::getConfig('menu.menus1');
		$this->menus = $menus;
		return $this->render('menu/menu.php');
	}
	
	function patientAction() {
		// 权限确认
		//ATools::exceed();
		
		$ROLE_ID = $_SESSION['user']['role_id'];
		if ($ROLE_ID) {
			//$fields = 'ROLE_NAME, REMARK, RIGHT_LIST';
			$where = "ROLE_ID=$ROLE_ID";
			$this->role = JYDB::find("ROLE",$where,"*","");
		}
		$this->roleid = $ROLE_ID;
		
		// 获取菜单表
		//$this->menus = CKConfig::$menus;
		$menus =  ATools::getConfig('menu.menus2');
		$this->menus = $menus;
		return $this->render('menu/menu.php');
	}
	
	function feedAction() {
		// 权限确认
		//ATools::exceed();
	
		$ROLE_ID = $_SESSION['user']['role_id'];
		if ($ROLE_ID) {
			//$fields = 'ROLE_NAME, REMARK, RIGHT_LIST';
			$where = "ROLE_ID=$ROLE_ID";
			$this->role = JYDB::find("ROLE",$where,"*","");
		}
		$this->roleid = $ROLE_ID;
	
		// 获取菜单表
		//$this->menus = CKConfig::$menus;
		$menus =  ATools::getConfig('menu.menus6');
		
		$this->menus = $menus;
		return $this->render('menu/menu.php');
	}
	
	function analysisAction() {
		// 权限确认
		//ATools::exceed();
	
		$ROLE_ID = $_SESSION['user']['role_id'];
		if ($ROLE_ID) {
			//$fields = 'ROLE_NAME, REMARK, RIGHT_LIST';
			$where = "ROLE_ID=$ROLE_ID";
			$this->role = JYDB::find("ROLE",$where,"*","");
		}
		$this->roleid = $ROLE_ID;
	
		// 获取菜单表
		//$this->menus = CKConfig::$menus;
		$menus =  ATools::getConfig('menu.menus3');
		$this->menus = $menus;
		return $this->render('menu/menu.php');
	}
	
	function systemAction() {
		// 权限确认
		//ATools::exceed();
	
		$ROLE_ID = $_SESSION['user']['role_id'];
		if ($ROLE_ID) {
			//$fields = 'ROLE_NAME, REMARK, RIGHT_LIST';
			$where = "ROLE_ID=$ROLE_ID";
			$this->role = JYDB::find("ROLE",$where,"*","");
		}
		$this->roleid = $ROLE_ID;
	
		// 获取菜单表
		//$this->menus = CKConfig::$menus;
		$menus =  ATools::getConfig('menu.menus4');
		$this->menus = $menus;
		return $this->render('menu/menu.php');
	}
	
	function questionnaireAction() {
		// 权限确认
		//ATools::exceed();
	
		$ROLE_ID = $_SESSION['user']['role_id'];
		if ($ROLE_ID) {
			//$fields = 'ROLE_NAME, REMARK, RIGHT_LIST';
			$where = "ROLE_ID=$ROLE_ID";
			$this->role = JYDB::find("ROLE",$where,"*","");
		}
		$this->roleid = $ROLE_ID;
	
		// 获取菜单表
		//$this->menus = CKConfig::$menus;
		$menus =  ATools::getConfig('menu.menus5');
		$this->menus = $menus;
		return $this->render('menu/menu.php');
	}
	
	function getmenuAction(){	
		
	}

}